
#include "ShaderVertex.h"

ShaderVertex::ShaderVertex()
	: m_vao(0)
{

}

void ShaderVertex::release()
{
	if (isValid())
	{
		glDeleteVertexArrays(1, &m_vao);
		m_vao = 0;
	}
}

bool ShaderVertex::init()
{
	initBinding();
	cleanBinding();
	return true;
}

void ShaderVertex::initBinding()
{
	glGenVertexArrays(1, &m_vao);
	bindingVertexArray();
}

void ShaderVertex::cleanBinding()
{
	cleanVertexArray();
}

void ShaderVertex::bindingVertexArray()
{
	glBindVertexArray(m_vao);
}

void ShaderVertex::cleanVertexArray()
{
	glBindVertexArray(0);
}


